<template>
  <div class="app-container">
     <!-- <div class="detail-title">自定义方法模块</div> -->
    <el-row>
      <el-col :span="12">
        <div class="detail-title-form">
          <el-form ref="elform" :model="form" label-width="100px" :rules="elrules">
            <el-form-item label="模块分类：" prop="dlltype">
              <el-select v-model="form.dlltype" placeholder="请选择模块分类" @change="handleChange">
                <el-option :label="item.label" :value="item.value" v-for="item in moduleClassSelectList"></el-option>
              </el-select>
            </el-form-item>
          </el-form>
        </div>
      </el-col>
      <el-col :span="12">
        <el-button type="primary" class="detail-center-btn" @click="count(form)">
          <svg-icon icon-class="line-bar"/>
          计算
        </el-button>
      </el-col>
    </el-row>
    <div class="container">
      <div class="container-warp container-left" style="width:29%;height: 275px;padding: 5px 10px 0;">
        <div class="table-title">材料性能</div>
        <el-row :gutter="20">
          <!-- <el-col :span="14">
            <div class="material-pic">
              <img src="@/assets/images/big-button-bg.png">
            </div>
          </el-col> -->
          <el-col :span="24" class="material-form">
            <el-form  @submit.native.prevent ref="mform" :model="form" label-width="80px" :inline="true" label-position="left" :rules="mrules">
              <el-form-item  prop="rm">
                <template solt="label" >
                  <div class="label-subscript" style="width: 90px;">
                    <el-tooltip content="材料标准试样的抗拉强度，MPa" placement="top" effect="light">
                      <div>
                        Rm（>0）
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.rm" placeholder="" type="number"  @keyup.enter.prevent />
              </el-form-item>
              <el-form-item prop="rp" v-if="form.dlltype == 'NWFRDLL'">
                <template solt="label">
                  <div class="label-subscript" style="width: 90px;">
                    <el-tooltip content="材料标准试样的屈服强度" placement="top" effect="light">
                      <div>
                        R<sub>p0.2</sub>（>0）
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.rp" placeholder="" type="number"></el-input>
              </el-form-item>
            </el-form>
          </el-col>
        </el-row>
      </div>
      <div class="container-right" style="width:69%;">
        <div class="container-warp" style="height: 180px; padding: 5px 10px;">
          <div class="table-title">结构参数</div>
          <div class="structure-form">
            <el-form ref="jform" :model="form" label-width="60px" :inline="true" label-position="left"  :rules="jrules">
              <el-form-item prop="j" v-if="form.dlltype != 'NWFRDLL'">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="结构质量水平" placement="top" effect="light">
                      <div>
                        J
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-cascader
                    v-model="form.j"
                    :options="JSelectList"></el-cascader>
                <!-- <el-select v-model="form.j" placeholder="">
                  <el-option :label="item.label" :value="item.value" v-for="item in JSelectList"></el-option>
                </el-select> -->
              </el-form-item>
              <el-form-item prop="j0" v-if="form.dlltype != 'NWFRDLL'">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="材料无损检测技术常数" placement="top" effect="light">
                      <div>
                        J<sub>0</sub>（0或1）
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-cascader
                    v-model="form.j0"
                    :options="J0SelectList"></el-cascader>
                <!-- <el-select v-model="form.j0" placeholder="">
                  <el-option :label="item.label" :value="item.value" v-for="item in J0SelectList"></el-option>
                </el-select> -->
              </el-form-item>
              <el-form-item label=""  prop="t">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="结构有限厚度,mm" placement="top" effect="light">
                      <div>
                        t（>0）
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.t" placeholder=""  type="number">
                </el-input>
              </el-form-item>
              <el-form-item label=""  prop="alfak">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="弹性应力集中系数αk" placement="top" effect="light">
                      <div>
                        α<sub>k</sub>（>0）
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.alfak" placeholder="" type="number" >
                </el-input>
              </el-form-item>
              <el-form-item label=""  prop="gsigamma">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="应力梯度" placement="top" effect="light">
                      <div>
                        G<sub>a</sub>（>0）
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.gsigamma" placeholder="" type="number">
                </el-input>
              </el-form-item>
              <el-form-item label=""  prop="ag" v-if="form.dlltype != 'NWFRDLL'" >
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="平均应力敏感系数材料常数aG" placement="top" effect="light">
                      <div>
                        a<sub>G</sub>
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.ag" placeholder="" type="number">
                </el-input>
              </el-form-item>
              <el-form-item label=""  prop="ag1" v-if="form.dlltype == 'NWFRDLL'">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="平均应力敏感系数材料常数aG" placement="top" effect="light">
                      <div>
                        a<sub>G</sub>
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-select v-model="form.ag1" placeholder="">
                  <el-option :label="item.label" :value="item.value" v-for="item in agSelectList"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label=""  prop="bg" v-if="form.dlltype != 'NWFRDLL'">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="平均应力敏感系数材料常数bG" placement="top" effect="light">
                      <div>
                        b<sub>G</sub>
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.bg" placeholder="" type="number">
                </el-input>
              </el-form-item>
              <el-form-item label=""  prop="bg1" v-if="form.dlltype == 'NWFRDLL'">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="平均应力敏感系数材料常数bG" placement="top" effect="light">
                      <div>
                        b<sub>G</sub>
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-select v-model="form.bg1" placeholder="">
                  <el-option :label="item.label" :value="item.value" v-for="item in bgSelectList"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label=""  prop="rz">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="表面粗糙度,μm" placement="top" effect="light">
                      <div>
                        R<sub>z</sub>（>0）
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.rz" placeholder="" type="number">
                </el-input>
              </el-form-item>
              <el-form-item label=""  prop="sps">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="缩减系数" placement="top" effect="light">
                      <div>
                        S<sub>ps</sub>（0,1）
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.sps" placeholder="" type="number">
                </el-input>
              </el-form-item>
              <el-form-item label=""  prop="lamdam">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="安全分项系数" placement="top" effect="light">
                      <div>
                        γ<sub>M</sub>（>0）
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.lamdam" placeholder="" type="number">
                </el-input>
              </el-form-item>
              <el-form-item label=""  prop="dadmi">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="损伤设计值" placement="top" effect="light">
                      <div>
                        D<sub>admi</sub>（0,1）
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.dadmi" placeholder="" type="number">
                  <!-- <el-button slot="append"  @click="showDaModel">
                    <svg-icon icon-class="calculator"/>
                  </el-button> -->
                </el-input>
              </el-form-item>
            </el-form>
          </div>
        </div>
        <div class="container-warp" style="height: 85px; padding: 5px 10px;">
          <div class="table-title">服役载荷</div>
          <div class="upload-file fyzh">
            <div>
              <!-- 文件列表 -->
              <transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
                <li key="1123" class="el-upload-list__item ele-upload-list__item-content" style="border: none" v-for="(file, index) in fileList">
                  <span class="el-icon-document"> {{ file.name }} </span>
                </li>
              </transition-group>
            </div>
            <el-upload
              action="/"
              :before-upload="handleBeforeUpload"
              :file-list="fileList"
              :on-exceed="handleExceed"
              class="upload-file-uploader"
            >
                  <!-- :limit="limit" -->
              <!-- 上传按钮 -->
              <el-button size="mini" type="primary">选取文件</el-button>
              <!-- 上传提示 -->
              <div class="el-upload__tip" slot="tip" v-if="showTip">
                请上传
                <template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
                <template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
                的文件
              </div>
            </el-upload>
          </div>
        </div>
      </div>
    </div>
    <div class="line-warp"></div>
    <div class="container container-bottom">
      <div class="container-warp container-left" style="height: 100%">
        <div class="label-title">强度评价</div>
        <div class="label-log-form" v-if="showResult == true">
          <el-form ref="form" label-width="200px" :inline="true" label-position="left">
            <el-form-item>
              <!-- <el-input v-model="form.user" placeholder="审批人"></el-input> -->
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="结构疲劳累积损伤" placement="top" effect="light">
                    <div>
                      D<sub>L</sub>
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{dl}}
            </el-form-item>
            <el-form-item label="">
              <!-- <el-input v-model="form.user" placeholder="审批人"></el-input> -->
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="结构疲劳寿命预测" placement="top" effect="light">
                    <div>
                      T<sub>S</sub>
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{ts}}
            </el-form-item>
          </el-form>
        </div>
        <div  v-if="showResult == true" class="log-warp" :style="'height:'+logContentHeight+'px'">
          <div class="log-content divcontainer wrap-text" style="white-space:pre">
            <span class="badge" @click="showLogModel">
              <img src="@/assets/images/big_X.png" style="width: 30px;height: 30px;">
              </span>
            {{ logText }}
          </div>
        </div>
        <!-- <el-button type="primary" class="detail-center-btn" >
          <svg-icon icon-class="user-list"/>
          打开日志文件
        </el-button> -->
      </div>
      <div class="container-warp container-right">
        <div class="label-title" style="margin-bottom: 10px">结构P-S-N图</div>
        <el-carousel  v-if="showResult == true" arrow="always" class="chart-warp" :style="'height:'+(logContentHeight+50)+'px'">
          <el-carousel-item v-for="item in 1" :key="item">
            <!-- <h3 class="small">{{ item }}</h3> -->
            <!-- {{ logContentHeight }} -->
            <sn-chart :chartData="loglineChartData"  ref="snchart"/>
          </el-carousel-item>
        </el-carousel>
      </div>
    </div>
    <el-dialog
      width="80%"
      title="日志"
      :visible.sync="logModel"
      >
      <div class="wrap-text" :style="'height:'+ heightTestData +'px;overflow-y: auto;white-space:pre'">
        {{ logText }}
      </div>
    </el-dialog>
    <el-dialog
      width="40%"
      title="计算损伤系数"
      :visible.sync="daModel"
      >
      <el-form ref="wform" class="dg-structure-form" :model="form" label-width="150px" :inline="true" label-position="left" :rules="wrules">
        <el-form-item prop="materialtype">
          <template solt="label">
            <div class="dg-label-subscript">
              <el-tooltip content="材料类别" placement="top" effect="light">
                <div>
                  材料
                </div>
              </el-tooltip>
            </div>
          </template>
          <el-select v-model="form.materialtype" placeholder="">
            <el-option :label="item.label" :value="item.value" v-for="item in IMSelectList"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <el-button type="primary" class="detail-center-btn" @click="countDadmi(form)">
        计算
      </el-button>
    </el-dialog>
  </div>
</template>

<script>
  import service from "@/api/material";
  import SnChart from "./snChart";
  export default {
    name: "Dnvdetail",
    components: {
      SnChart
    },
    props: {
      // 值
      value: [String, Object, Array],
      // 数量限制
      limit: {
        type: Number,
        default: 1,
      },
      // 大小限制(MB)
      fileSize: {
        type: Number,
        default: 5,
      },
      // 文件类型, 例如['png', 'jpg', 'jpeg']
      fileType: {
        type: Array,
        default: () => ["xlsx", "xls"],
      },
    },
    data() {
      return {
        elrules:{
          dlltype: [{
            required: true,
            message: '模块分类不能为空',
            trigger: 'change'
          }]
        },
        wrules:{
          materialtype: [{
            required: true,
            message: '材料类别Im不能为空',
            trigger: 'change'
          }]
        },
        mrules:{
          rm: [{
            required: true,
            message: '材料标准试样的抗拉强度不能为空',
            trigger: 'blur'
          }],
          rp: [{
            required: true,
            message: '材料标准试样的屈服强度不能为空',
            trigger: 'blur'
          }],
        },
        jrules:{
          j: [{
            required: true,
            message: '结构质量水平不能为空',
            trigger: 'change'
          }],
          j0: [{
            required: true,
            message: '材料无损检测技术常数不能为空',
            trigger: 'change'
          }],
          t: [{
            required: true,
            message: '结构有效厚度不能为空',
            trigger: 'blur'
          }],
          alfak: [{
            required: true,
            message: '弹性应力集中系数不能为空',
            trigger: 'blur'
          }],
          gsigamma: [{
            required: true,
            message: '应力梯度不能为空',
            trigger: 'blur'
          }],
          ag: [{
            required: true,
            message: '平均应力敏感系数材料常数不能为空',
            trigger: 'blur'
          }],
          bg: [{
            required: true,
            message: '平均应力敏感系数材料常数不能为空',
            trigger: 'blur'
          }],
          ag1: [{
            required: true,
            message: '平均应力敏感系数材料常数不能为空',
            trigger: 'blur'
          }],
          bg1: [{
            required: true,
            message: '平均应力敏感系数材料常数不能为空',
            trigger: 'blur'
          }],
          rz: [{
            required: true,
            message: '表面粗糙度不能为空',
            trigger: 'blur'
          }],
          sps: [{
            required: true,
            message: '缩减系数不能为空',
            trigger: 'blur'
          }],
          lamdam: [{
            required: true,
            message: '安全分项系数不能为空',
            trigger: 'blur'
          }],
          dadmi: [{
            required: true,
            message: '损伤设计值不能为空',
            trigger: 'blur'
          }]
        },
        form:{
          ag: 0.25,
          bg: 2000,
          rp: null,
          j: null,
          j0: null,
        },
        item: [1],
        logText: '',
        moduleClassSelectList: [
          {value: 'CIDLL', label: '铸铁结构',},
          {value: 'CSDLL', label: '铸钢结构',},
          {value: 'NWFRDLL', label: '锻造或轧制的非焊接结构',},
        ],
        IMSelectList: [
          {value: 1, label: '细晶结构钢',},
          {value: 2, label: '不锈钢',},
          {value: 3, label: '淬火钢',},
          {value: 4, label: '锻钢',},
          {value: 5, label: '其他钢',},
          {value: 6, label: '一般用途铸钢和热处理铸钢',},
          {value: 7, label: '球墨铸铁',},
          {value: 8, label: '可锻铸铁',},
          {value: 9, label: '片状石墨铸铁',},
          {value: 10, label: '挤压铝合金',},
          {value: 11, label: '变形铝合金',},
        ],
        JSelectList: [
            {
              value: 10,
              label: '厚度:t ≤ 100mm',
              children: [{
                value: 1,
                label: 'A1，B1，C1'
              }, {
                value: 2,
                label: 'A2，B2，C2'
              }, {
                value: 3,
                label: 'A3，B3，C4'
              }]
            }, {
              value: 11,
              label: '厚度:100mm < t ≤ 250mm',
              children: [{
                value: 1,
                label: 'A1，B1，C2'
              }, {
                value: 2,
                label: 'A2，B2，C3'
              }, {
                value: 3,
                label: 'A3，B3，C5'
              }]
            }, {
              value: 12,
              label: '厚度:250mm < t ≤ 400mm',
              children: [{
                value: 1,
                label: 'A1，B1，C3'
              }, {
                value: 2,
                label: 'A2，B2，C4'
              }, {
                value: 3,
                label: 'A3，B3，C6'
              }]
            }
        ],
        J0SelectList: [
          {value: 0, label: '超声波',},
          {value: 0, label: '镭射',},
          {value: 1, label: '采用了额外的液体渗透剂',},
          {value: 1, label: '采用了额外的磁性颗粒',},
        ],
        agSelectList: [
          {value: 0.40, label: '不锈钢',},
          {value: 0.50, label: '其他钢',},
          {value: 0.05, label: '变型铝合金',},
        ],
        bgSelectList: [
          {value: 2400, label: '不锈钢',},
          {value: 2700, label: '其他钢',},
          {value: 850, label: '变型铝合金',},
        ],
        logModel: false,
        heightTestData: '',
        logContentHeight: '',
        number: 0,
        uploadList: [],
        fileList: [],
        dl: '',
        ts: '',
        loglineChartData: {},
        showResult: false,
        showSN: false,
        selectedLabel: "",
        daModel: false
      };
    },
    created() {
      this.logContentHeight = window.innerHeight - 570
    },
    watch: {
      value: {
        handler(val) {
          if (val) {
            let temp = 1;
            // 首先将值转为数组
            const list = Array.isArray(val) ? val : this.value.split(',');
            // 然后将数组转为对象数组
            this.fileList = list.map(item => {
              if (typeof item === "string") {
                item = { name: item, url: item };
              }
              item.uid = item.uid || new Date().getTime() + temp++;
              return item;
            });
          } else {
            this.fileList = [];
            return [];
          }
        },
        deep: true,
        immediate: true
      }
    },
    mounted() {
      this.$nextTick(()=>{
        this.heightTestData = window.innerHeight - 300
      })
      this.showResult = false
      this.showSN = false
    },
    methods: {
      listClass(index) {
      },
      goDetail(res) {
        this.$router.push({path: '/material/detail'})
      },
      showLogModel() {
        this.logModel = true
      },
      showDaModel(){
        this.daModel = true
      },
      handleChange(value) {
        this.selectedLabel = this.moduleClassSelectList.find(option => option.value === value).label;
        this.form = {
          ag: 0.25,
          bg: 2000,
          rp: null,
          j: null,
          j0: null,
        }
        this.$set(this.form, "dlltype", value)
        this.showResult = false
        this.showSN = false
        this.logText = null
        this.loglineChartData = {}
        this.ts = null
        this.dl = null
        this.fileList = []
        if(value == 'CIDLL'  || value == 'CSDLL'){
          this.form.ag=0.25
          this.form.bg=2000
        }else{
          this.form.ag=null
          this.form.bg=null
        }
      },
      // 上传前校检格式和大小
      handleBeforeUpload(file) {
        // 校检文件类型
        if (this.fileType) {
          const fileName = file.name.split('.');
          const fileExt = fileName[fileName.length - 1];
          const isTypeOk = this.fileType.indexOf(fileExt) >= 0;
          if (!isTypeOk) {
            this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
            return false;
          }
        }
        // 校检文件大小
        if (this.fileSize) {
          const isLt = file.size / 1024 / 1024 < this.fileSize;
          if (!isLt) {
            this.$modal.msgError(`上传文件大小不能超过 ${this.fileSize} MB!`);
            return false;
          }
        }
        // this.$modal.loading("正在上传文件，请稍候...");
        // this.number++;
        this.fileList = [file]
        return true;
      },
      // 文件个数超出
      handleExceed() {
        this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
      },
      // 获取文件名称
      getFileName(name) {
        // 如果是url那么取最后的名字 如果不是直接返回
        if (name.lastIndexOf("/") > -1) {
          return name.slice(name.lastIndexOf("/") + 1);
        } else {
          return name;
        }
      },
      // 对象转成指定字符串分隔
      listToString(list, separator) {
        let strs = "";
        separator = separator || ",";
        for (let i in list) {
          strs += list[i].url + separator;
        }
        return strs != '' ? strs.substr(0, strs.length - 1) : '';
      },
      countDadmi(form){
        if(this.form.materialtype==null || this.form.materialtype==undefined || this.form.materialtype==""){
          this.$modal.msgError(`材料类别IM不能为空!`);
          return false;
        }
        let formData = new FormData()
        formData.append('materialtype',form.materialtype)
        service.computeDesignParamDamage(formData).then(res => {
          this.form.dadmi = res.data.value
          this.daModel = false
        }).catch((err)=>{
          if(err.code == 500){
            that.$modal.msgError(err.mas);
          }
        })

      },
      count(form){
        this.$refs.elform.validate(valid => {
          if (!valid) return
          this.$refs.mform.validate(valid2 => {
            if (!valid2) return
            this.$refs.jform.validate(valid3 => {
              if (!valid3) return
              console.log(form)
              console.log(this.$refs)
              if(this.fileList.length==0){
                this.$modal.msgError(`请上传服役载荷文件!`);
                return false
              }
              let file = this.fileList[0]
              let formData = new FormData()
              formData.append('file',file)
              formData.append('dlltype',form.dlltype)
              formData.append('rm',form.rm)
              formData.append('rp02',form.rp)
              formData.append('dadmi',form.dadmi)
              if(form.dlltype =='NWFRDLL'){
                formData.append('ag',form.ag1)
                formData.append('bg',form.bg1)
              }else{
                formData.append('ag',form.ag)
                formData.append('bg',form.bg)
                formData.append('j',form.j[1])
                formData.append('j0',form.j0)
              }
              formData.append('gsigamma',form.gsigamma)
              formData.append('t',form.t)
              formData.append('alfak',form.alfak)
              formData.append('rz',form.rz)
              formData.append('sps',form.sps)
              formData.append('lamdam',form.lamdam)
              service.dnvgModuleForecast(formData).then(res => {
                this.showResult = true
                this.showSN = true
                this.logText = res.data.contents
                this.loglineChartData.title = this.selectedLabel+"SN图"
                this.loglineChartData.ymin = res.data.ymin
                this.loglineChartData.xmin = res.data.xmin
                this.loglineChartData.ymax = res.data.ymax
                this.loglineChartData.xmax = res.data.xmax
                this.loglineChartData.data = res.data.data
                this.ts = res.data.ts.toExponential()
                this.dl = res.data.dl.toExponential()
                // this.loglineChartData.xData = "寿命"
                // this.loglineChartData.yData = "应力"


                this.$nextTick(() => {
                  this.$refs.snchart[0].initChart()
                });
              }).catch((err)=>{
                if(err.code == 500){
                  that.$modal.msgError(err.mas);
                }

              })
            })
          })
        })
      }
    }
  };
</script>

<style scoped lang="scss">
  .app-container {
    display: block;
    padding: 5px;
    height: calc(100% - 65px);
  }
  .container-bottom{
    height: calc(100% - 295px);
    overflow: hidden;
  }

  .detail-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    font-size: 20px;

    &:before, &:after {
      content: '';
      display: inline-block;
      width: 37%;
      height: 4px;
      border-bottom: 1px solid #BAD7EC;
      border-top: 1px solid #BAD7EC;
    }
  }

  .detail-title-form {
    width: 450px;
    margin: 10px auto;
    ::v-deep .el-form-item{
      margin-bottom: 15px;
    }
    ::v-deep .el-form-item__label {
      color: #084EBC;
      font-weight: normal;
    }
  }

  .container {
    width: 100%;
    display: flex;
    justify-content: space-around;
  }

  .container-warp {
    width: 100%;
    display: inline-block;
    border: 1px solid #ddd;
    background-color: #fff;
    box-shadow: 0 0 5px #eeeeee;
  }

  .container-right {
    .container-warp + .container-warp {
      margin-top: 10px;
    }
  }

  .container-left {
    width: 49%;
  }

  .container-right {
    width: 49%;
  }

  .detail-center-btn {
    display: block;
    width: 260px;
    margin: 6px auto;
  }

  .table-title {
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
    height: 26px;
    color: #5184ec;
    text-indent: 10px;
    border-bottom: 1px solid #d5d5d5;
    background: url("../../../assets/images/line.png") no-repeat;
    background-position: -143px 22px;
  }

  .material-pic {
    background-color: #fff;
    border: 1px solid #CCDCE7;
    border-radius: 5px;
    width: 100%;
    max-width: 330px;
    height: 190px;
    margin-top: 15px;
    margin-left: 5px;
    display: flex;
    align-items: center;
    justify-content: center;

    img {
      width: 209.28px;
      height: 173.6px;
    }
  }

  .material-form {
    margin-top: 10px;

    ::v-deep .el-form-item__label {
      font-weight: normal;
    }

    ::v-deep .el-form-item {
      width: 100%;
      margin-bottom: 12px;
    }

    ::v-deep .el-input--medium {
      width: calc(100% - 90px);
    }

    ::v-deep .el-select {
      .el-input--medium {
        width: 100% !important;
      }

      width: calc(100% - 90px) !important;
    }
  }

  .label-title {
    width: 133px;
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    height: 26px;
    color: #5184ec;
    text-indent: 10px;
    border-left: 3px solid #166BCE;
    background: url("../../../assets/images/label_bg.png") no-repeat;
    background-size: 100%;
  }


  .log-warp {
    width: 96%;
    margin-left: 2%;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    padding: 5px 10px;
    height: 100%;
    font-size: 14px;
  }

  .label-log-form {
    margin-top: 5px;
    text-align: center;
  }

  .log-warp + .detail-center-btn {
    width: 300px;
  }

  .label-subscript {
    display: inline-block;
    width: 70px;
  }

  .structure-form {
    .label-subscript {
      width: 90px;
    }
  }

  .structure-form {
    margin-top: 10px;
    padding: 0 10px;

    ::v-deep .el-form-item__label {
      font-weight: normal;
    }

    ::v-deep .el-form-item {
      width: 23%;
      margin-bottom: 5px !important;
    }

    ::v-deep .el-input--medium {
      width: calc(100% - 90px);
      margin-bottom: 5px !important;
    }

    ::v-deep .el-input-group__append {
      padding: 0 6px;
    }

    ::v-deep .el-select {
      .el-input--medium {
        width: 100% !important;
      }

      width: calc(100% - 90px) !important;
    }
    ::v-deep .el-cascader {
      .el-input--medium {
        width: 100% !important;
      }

      width: calc(100% - 90px) !important;
    }
  }

  .structure-forms {
    margin-top: 10px;
    padding: 0 10px;

    ::v-deep .el-form-item__label {
      font-weight: normal;
    }

    ::v-deep .el-form-item {
      width: 48%;
      margin-bottom: 15px !important;
    }

    ::v-deep .fy {
      width: 31%;
    }

    /*::v-deep .fy .el-tooltip {*/
    /*  width: 90px !important;*/
    /*}*/

    /*::v-deep .fy .el-input--medium {*/
    /*  width: calc(100% - 90px)  !important;*/
    /*}*/

    ::v-deep .el-form-item__content {
      width: calc(100% - 125px);
    }

    .form-label-tooltip {
      ::v-deep .el-form-item__content {
        width: 100%;
      }

      ::v-deep .el-tooltip {
        width: 50px;
        display: inline-block;
      }

      ::v-deep .el-input--medium {
        width: calc(100% - 50px);
      }
    }
  }
  .divcontainer {
    position: relative;
  }

  .badge {
    position: absolute;
    cursor: pointer;
    top: -5px;
    right: -10px;
    width: 30px;
    height: 30px;
    background-color: #ffffff;
    color: white;
    /* border-radius: 50%; */
    text-align: center;
    line-height: 30px;
  }
  .chart-warp{
    .el-carousel__item{
      width: 80%;
      margin-left: 10%;
    }
  }
  .line-warp{
    width: 98%;
    height: 4px;
    border-top: 1px dashed #bad7ec;
    border-bottom: 1px dashed #bad7ec;
    margin: 6px 1%;
  }
  ::v-deep .el-carousel__container{
    height: 100%;
  }
  .upload-file-uploader {
    margin-bottom: 5px;
    margin-left: auto;
    margin-right: auto;
  }
  .upload-file-list .el-upload-list__item {
    border: 1px solid #e4e7ed;
    line-height: 2;
    margin-bottom: 10px;
    position: relative;
  }
  .upload-file-list .ele-upload-list__item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: inherit;
  }
  .ele-upload-list__item-content-action .el-link {
    margin-right: 10px;
  }
  .fyzh{
    display: inline-flex;
    width: 100%;
  }
  /* CSS 类用于换行 */
  .wrap-text {
    white-space: pre-line;
  }

  /* 用于处理长单词或 URL 的换行 */
  .break-word {
    word-break: break-all;
    overflow-wrap: break-word;
  }

  ::v-deep .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:before{
      // content: '*' !important;
      display: none
  }

  .dg-structure-form {
    margin-top: 10px;
    padding: 0 10px;

    ::v-deep .el-form-item__label {
      font-weight: normal;
    }

    ::v-deep .el-form-item {
      width: 76%;
      margin-bottom: 5px !important;
    }

    ::v-deep .el-input--medium {
      width: calc(100% - 100px);
      margin-bottom: 5px !important;
    }

    ::v-deep .el-input-group__append {
      padding: 0 6px;
    }
    ::v-deep .el-select {
      .el-input--medium {
        width: 100% !important;
      }

      width: calc(100% - 100px) !important;
    }
  }
  .dg-label-subscript {
    display: inline-block;
    width: 100px;
  }
  ::v-deep .el-upload-list__item-name{
    display: none !important;
  }

</style>
